import React from 'react';
import {
  Form,
  Modal,
  Table,
} from 'antd';


// 查看详情
const DescView = Form.create()(props => {
  const { lookDescView, handleLookDesc, borrowList } = props;

  const columns = [{
    title: '出借人名称',
    dataIndex: 'userName',
    key: 'userName',
  }, {
    title: '出借时间',
    dataIndex: 'createTime',
    key: 'createTime',
  }, {
    title: '出借金额',
    dataIndex: 'amount',
    key: 'amount',
  }];
  return (
    <Modal
      width={640}
      destroyOnClose
      title="出借列表"
      visible={lookDescView}
      onOk={() => handleLookDesc(false, [])}
      onCancel={() => handleLookDesc(false, [])}>
      <div>
        <Table dataSource={borrowList.msg} columns={columns}/>
      </div>
    </Modal>
  );
});

export default DescView;
